package br.facet.utils;

import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

public final class WebUtils {

	public static void setValor(String nome, Object valor) {
		getSession().setAttribute(nome, valor);
	}
	
	public static Object getValor(String chave) {
		return getSession().getAttribute(chave);
	}
	
	private static HttpSession getSession() {
		return (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
	}
}
